package com.campuscrowdsourcing.server.controller;


import com.campuscrowdsourcing.server.domain.vo.FileVO;
import com.campuscrowdsourcing.server.service.SystemFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 文件信息表 前端控制器
 * </p>
 *
 * @author Xinyuan Zhao
 * @since 2023-03-20
 */
@RestController
@RequestMapping("/api/file")
public class SystemFileController {

    @Autowired
    private SystemFileService systemFileService;


    @PostMapping("/upload")
    public FileVO uploadLoaclFile(MultipartFile file){
        return systemFileService.uploadImageFile(file,1);
    }


}

